package com.angel.dto;

import com.angel.bean.Template;

import java.util.ArrayList;
import java.util.List;

public class TemplateDisplayDto extends Template {
    List<TemplateDto> templateDtos;

    public TemplateDisplayDto() {
        this.templateDtos = new ArrayList<>();
    }

    public TemplateDisplayDto(Template template) {
      this.setTemId(template.getTemId());
      this.setTemType(template.getTemType());
      this.setState(template.getState());
      this.setTemSumPrice(template.getTemSumPrice());
      this.setTemDetail(template.getTemDetail());
      this.setTemNote(template.getTemNote());
      this.setTemInstruct(template.getTemInstruct());
      this.setTemEffect(template.getTemEffect());
      this.setTemrroductprice(template.getTemrroductprice());

    }

    public List<TemplateDto> getTemplateDtos() {
        return templateDtos;
    }

    public void setTemplateDtos(List<TemplateDto> templateDtos) {
        this.templateDtos = templateDtos;
    }

    public void setDto(TemplateDto templateDto){
        if (this.templateDtos ==null){
           this.templateDtos = new ArrayList<>();
        }
        this.templateDtos.add(templateDto);

    }
}
